<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition template="/css/template.xhtml">

	<ui:define name="main">
		<rich:modalPanel id="alterarSenha" >
			<f:facet name="header">Atualizar Dados</f:facet>
			<h:form>
			<h:message for="novSenha" />
				<h:panelGrid columns="2">
					
					<h:outputText value="Senha antiga" />
					<h:outputText value="************" />
					<h:outputText value="Nova Senha" />
					<h:inputSecret id="novSenha" value="#{pessoaBean.logado.senha}" required="true" autocomplete="off"/>
					<h:commandButton action="#{pessoaBean.atualizarSenha}" value="Atualizar" id="Atualizar" >
						<rich:componentControl for="alterarSenha" attachTo="Atualizar"
							operation="hide" event="onclick" />
					</h:commandButton>
					
					<h:commandButton action="#" value="cancelar" id="cancelar" immediate="true">
						<rich:componentControl for="alterarSenha" attachTo="cancelar"
							operation="hide" event="onclick" />
					</h:commandButton>
				</h:panelGrid>
			</h:form>

		</rich:modalPanel>
		<rich:panel style="text-align:center;margin:auto;width:70%;">
			<f:facet name="header">Dados Pessoais</f:facet>
			<h:messages errorStyle="color:red" warnStyle="color:yellow"
				infoStyle="color:green" />
			<h:form>
				<h:panelGrid columns="2" cellspacing="1px"
					style="text-align:center; margin:auto;">
					<h:outputText value="Nome:" />
					<h:outputText value="#{pessoaBean.logado.nome}" id="nome" />
					<h:outputText value="Apartamento:" />
					<h:outputText value="#{pessoaBean.logado.apartamento}"
						id="apartamento" />

					<h:outputText value="Login:" />
					<h:outputText value="#{pessoaBean.logado.login}" id="login" />
					<h:outputText value="Senha:" />
					<h:outputText value="***************" id="senha" />



					<h:outputText value="" />
					<a4j:commandButton id="alterar" value="alterar"
						action="#">
						<rich:componentControl for="alterarSenha" attachTo="alterar"
							operation="show" event="onclick" />
					</a4j:commandButton>
				</h:panelGrid>

			</h:form>
		</rich:panel>
	</ui:define>
</ui:composition>

</html>